﻿using Castle.DynamicProxy;
using CNKI.TPI.Web.Admin.Model;
using CNKI.TPI.Web.Base;
using CNKI.TPI.Web.Search.IBLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace CNKI.TPI.Web.UI.Controllers.Search
{
    public class TopicResourceController : BaseController
    {
        //
        // GET: /TopicResource/
        private ITopicService topicService = null;

        public TopicResourceController(ITopicService topicService)
        {
            this.topicService = generator.CreateInterfaceProxyWithTarget<ITopicService>(topicService, new IInterceptor[] { new LogInterceptor() });
        }
        public ActionResult Index()
        {

            IList<SYS_CMS_TOPIC> list = topicService.GetTopicInfoAll().Where(c => c.TopicStatus == 1).ToList();
            ViewBag.TopicList = list;
            return View();
        }

    }
}
